package com.aptemo.webetek.shared;

import java.io.Serializable;

import com.aptemo.webetek.client.commands.Response;
import com.aptemo.webetek.client.enums.EnumTeamStatus;

public class TeamBean implements Response, Serializable
{
	/**
	 * 
	 */
	private static final long	serialVersionUID		= -3079294697055638755L;
	private String				name;
	private String				id;
	private String				ownerEmail;
	private boolean				isPublic				= false;
	private String				description;
	private String				teamRules;
	private Double				minStake;
	private Double				maxStake;
	private boolean				placeBetNotifications	= false;
	private boolean				allowDuplicateBets		= false;
	private EnumTeamStatus		status;

	protected TeamBean()
	{
	}

	public TeamBean(String name)
	{
		this.name = name;
	}

	public void setKey(String key)
	{
		this.id = key;
	}

	public String getId()
	{
		return id;
	}

	public String getName()
	{
		return name;
	}

	public boolean isPublic()
	{
		return isPublic;
	}

	public void setPublic(boolean isPublic)
	{
		this.isPublic = isPublic;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	public String getDescription()
	{
		return description;
	}

	public void setTeamRules(String teamRules)
	{
		this.teamRules = teamRules;
	}

	public String getTeamRules()
	{
		return teamRules;
	}

	public Double getMinStake()
	{
		return minStake;
	}

	public Double getMaxStake()
	{
		return maxStake;
	}

	public void setMinStake(Double minStake)
	{
		if (minStake == null)
		{
			this.minStake = 0.0;
		}
		else
		{
			this.minStake = minStake;
		}
	}

	public void setMaxStake(Double maxStake)
	{
		if (maxStake == null)
		{
			this.maxStake = Double.POSITIVE_INFINITY;
		}
		else
		{
			this.maxStake = maxStake;
		}
	}

	public void setPlaceBetNotifications(boolean placeBetNotifications)
	{
		this.placeBetNotifications = placeBetNotifications;
	}

	public void setAllowDuplicateBets(boolean allowDuplicateBets)
	{
		this.allowDuplicateBets = allowDuplicateBets;
	}

	public boolean isNotifications()
	{
		return placeBetNotifications;
	}

	public boolean isAllowDuplicateBets()
	{
		return allowDuplicateBets;
	}

	public String getOwnerEmail()
	{
		return this.ownerEmail;
	}

	public void setOwnerEmail(String ownerEmail)
	{
		this.ownerEmail = ownerEmail;
	}

	public EnumTeamStatus getStatus()
	{
		return status;
	}

	public void setStatus(EnumTeamStatus status)
	{
		this.status = status;
	}

}
